<% form_for :group, @group, :url => { :action => 'update', :id => @group.id}, :html => { :id =>'group_form'} do |f| %>
  <fieldset>
      <div class="modal-head">
          <h2>Edit group: <%= h @group.name_was -%></h2>
      </div>

      <div class="modal-body">
          <% if @errors
               @errors.each do |error|
          %>
              <p class="error"><%= h error -%></p>
            <% end
               end
            %>
          <div class="modal-field">
              <label for="group[]">Name:<em class="mandatory">*</em></label>
              <%= f.text_field :name, :size => 25 %><br/>
              <span class="desc">Ex: my-group</span>
          </div>
          <div class="modal-field">
              <label for="group[]">Description:</label>
              <%= f.text_area :description, :rows => 3, :cols => 25 %>
          </div>
      </div>

      <div class="modal-foot">
          <%= submit_tag 'Save' -%>
          <%= link_to 'Cancel', { :controller => 'groups', :action => 'index', :id => nil}, { :class => 'action' } %><br/>
      </div>
  </fieldset>
<% end %>
<script>
  $j("#group_form").modalForm();
</script>
